import iosr11.data.Student;
import iosr11.data.Teacher;
import iosr11.gbase.BaseDAO;
import iosr11.gbase.BaseEngineImpl;

import java.net.URL;

import com.google.gdata.data.DateTime;


public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception{
		BaseDAO engine = BaseEngineImpl.getInstance();
		System.out.println(engine.authtenticate("iosr.team11@gmail.com", "iosr_team"));
		//System.out.println(engine.getStudentBase().addNewStudent("Jan K", "jan.k@gmail.com", 1234567));
		//System.out.println(engine.getTeacherBase().addNewTeacher("Andrzej M", "andrzej.m@gmail.com", true));
		URL url = new URL("http://www.google.com/m8/feeds/contacts/iosr.team11%40gmail.com/base/48de79278a2d8c6a");
		String userName = engine.getStudentBase().getContactsService().getUser(url).getTitle().getPlainText();
		Student student = engine.getStudentBase().getStudent(userName);
		System.out.println(student.toString());
		String teacherName = "Andrzej M";
		Teacher teacher = engine.getTeacherBase().getTeacher(teacherName);
		System.out.println(teacher.toString());
		DateTime date =DateTime.parseDate("1008-12-17");
		
		//engine.getMarksBase().addNewMarkToStudent(student.getId(), teacher.getId(), (float) 4.5, 1, date, 20);
		//System.out.println(contact.addNewUser("Janek", "janek@gmail.com"));
		//System.out.println(contact.getUser("Janek").getTitle().getPlainText());

	}

}
